package com.cyk.websockernew.api

import com.fasterxml.jackson.databind.ObjectMapper
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import javax.annotation.Resource

@RestController
class TestApi {

    @Resource private lateinit var mapper: ObjectMapper

    @RequestMapping("test")
    fun test(str: String): String {
        return mapper.writeValueAsString(str)
    }

}